package com.music.service;

import com.music.pojo.Music;
import com.music.pojo.Playlist;
import com.laoxuai.ibatis.util.PageInfo;

import java.text.ParseException;
import java.util.List;


public interface PlaylistService {

    /**
     * 新增
     *
     * @param playlist
     * @return
     */
    int insert(Playlist playlist, String tagStr);

    /**
     * 主键删除
     *
     * @param id
     * @return
     */
    int delete(Long id);

    /**
     * 主键修改
     *
     * @param playlist
     * @return
     */
    int update(Playlist playlist);

    /**
     * 主键获取
     *
     * @param id
     * @return
     */
    Playlist getByPrimaryKey(Long id);

    /**
     * 逻辑分页+条件
     *
     * @param playlist
     * @param page
     * @param size
     * @return
     */
    List<Playlist> listPage(Playlist playlist, int page, int size);

    /**
     * 物理分页+条件
     *
     * @param playlist
     * @param page
     * @param size
     * @return
     */
    PageInfo<Playlist> listPageInfo(Playlist playlist, int page, int size);

    List<Playlist> selectByExample(Playlist playlist);

    List<Music> pageById(Long id);

    int insertMusicToPlayList(Long playlistId, Integer id);
}